<template>
    <el-table :data="logData" border style="width: 100%">
        <el-table-column prop="username" label="登入账户" width="180" />
        <el-table-column prop="lastLogin.loginTime" label="上次登入时间" width="180" sortable />
        <el-table-column prop="lastLogin.ip" label="上次登入ip" width="180" />
        <el-table-column prop="address" label="Address" />
    </el-table>
</template>
<script setup>
//引入请求的接口
import * as api from "@/api/users"
import { ref, onBeforeMount } from "vue"
//日志数据
let logData = ref([])
onBeforeMount(async () => {
    try {
        //发起请求获取日志数据
        let res = await api.getLoginLogApi()
        logData.value = res.data.data;
        // console.log(res)
    } catch (e) {
        console.log(e)
    }
})
</script>
<script>
export default {
    meta: { title: 'glsy', name: '管理首页', routeName: "welcome",icon:"icon-shouye1" }
}
</script>
